<template>
  <div class="tradeInfo">
    <!-- 引入头部组件 并修改内容 -->
    <div class="header_box">
      <header1View>
        <template v-slot:left>
          <div class="title_left">
            <van-icon name="arrow-left"
                      class="icon"
                      @click="back" />
          </div>
        </template>
        <template v-slot:center>
          <div class="title_center">
            交易快照
          </div>
        </template>
      </header1View>
    </div>
    <div class="desc">
      交易快照包含订单创建时的商品描述和下单信息，买卖
      双方和平台在发生交易争议时，该页面作为判定依据。
    </div>

    <!-- 引入商品列表组件 -->
    <div>
      <kuaiZhaoComp :imgList="imgList"></kuaiZhaoComp>
    </div>
  </div>
</template>

<script>
// import { getOrderData } from '../../api/order'
import header1View from '../../components/OrdersComponents/header1View.vue'
import kuaiZhaoComp from '../../components/OrdersComponents/kuaiZhaoComp.vue'
export default {
  data () {
    return {
      imgList: {}
    }
  },
  components: {
    header1View,
    kuaiZhaoComp
  },
  methods: {
    back () {
      this.$router.go(-1)
    },
    // 发请求获取页面数据
    // getTradeInfo () {
    //   getOrderData({})
    //     .then((res) => {
    //       console.log(res);

    //     })
    //     .catch((err) => {
    //       console.log(err);
    //     })
    // }
  },
  created () {
    this.imgList = JSON.parse(this.$route.query.goodList)
  }
}
</script>

<style scoped lang="scss">
.tradeInfo {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f5f5;
  font-size: 14px;
}
.desc {
  margin: 15px;
  color: #6a6868;
}
.title_center {
  width: 100px;
  margin: 0 auto;
  align-items: center;
}
.icon {
  position: absolute;
  left: 10px;
  top: 50%;
  margin-top: -8px;
}
</style>